package com.monkey.util;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * desc:
 * auth: chenxiaobin
 * data: 2018/1/22.
 */
@Component
public class CountUtil {

    @Resource
    private WebConfig webConfig = null;

    public float generation(int n) {
        float base = webConfig.getFloat("monkey.generation.base");
        // (1 + 标准系数) ^ x
        return (float) Math.pow((1 + base), n);
    }
}
